package io.gitee.zicai.bus.bus;

import io.gitee.zicai.bus.core.IBusSender;

import java.util.function.BiConsumer;

/**
 * ISendBus
 *
 * @author zicai
 * @since 2021-01-18
 */
public interface ISendBus<S extends IBusSender, T> extends IBus<S, T> {

    @Override
    default T getPayload() {
        return getSendParam();
    }

    @Override
    default BiConsumer<S, T> getBiConsumer() {
        return send();
    }

    T getSendParam();

    BiConsumer<S, T> send();
}
